import API from "../plugins/request";
import { ResponseData } from "@/interface/request";
export const UserLogin = (data: unknown): Promise<ResponseData> => {
  return API.request({
    url: "/login",
    method: "post",
    data,
  });
};

export const UserRegieter = (data: unknown): Promise<ResponseData> => {
  return API.request({
    url: "/register",
    method: "post",
    data,
  });
};

export const getUserMsg = (): Promise<ResponseData> => {
  return API.request({
    url: "/user/list",
    method: "get",
  });
};
export const editPassword = (data: unknown): Promise<ResponseData> => {
  return API.request({
    url: "my/update/password",
    method: "post",
    data,
  });
};
export const getUserList = (): Promise<ResponseData> => {
  return API.request({
    url: "/getuserList",
    method: "get",
  });
};
